package com.firewolf.vue.controller;

import org.springframework.security.web.DefaultRedirectStrategy;
import org.springframework.security.web.RedirectStrategy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 作者：刘兴
 * 时间:19/3/6
 **/
@RestController
public class RestLoginController {

    private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();


    @GetMapping("/login")
    public void login(HttpServletRequest request, HttpServletResponse response) throws Exception {
        redirectStrategy.sendRedirect(request, response, "/login.html");
    }
}
